/**
* @公司名称: 上海恒生聚源数据服务有限公司
* @部门    ：产品开发三部
* @工程名  : UDEP
*/
package org.jony.JProject.objectPool;
/**
 * @类说明:
 * @作者    ：Jony
 * @E-mail  : lij@gildata.com
 * @创建日期: 2011-8-22上午9:02:33
 * @版本号  ：V.1.0
 */
public class PoolableObjectFactory {
	
	private static PoolableObjectFactory poolableObjectFactory;     //singleton  
    
    /** 
     *  
     */  
    private PoolableObjectFactory(){  
        super();  
    }  
      
    /** 
     *  
     * @return 
     */  
    public static PoolableObjectFactory getInstance(){  
          
        if(poolableObjectFactory==null){  
            return new PoolableObjectFactory();  
        }  
        return poolableObjectFactory;  
    }  
      
    /** 
     *  
     * @param classType 
     * @return 
     * @throws InstantiationException 
     * @throws IllegalAccessException 
     */  
    public Object createObject(Class classType) {  
        Object obj = null;  
        try {  
            obj = classType.newInstance();  
        } catch (InstantiationException e) {  
              
        } catch (IllegalAccessException e) {  
            throw new IllegalArgumentException("classType参数错误");  
        }  
        return obj;  
    }  
      
    //TODO: 从内存中删除该对象  
    public void destroyObject(Object obj){  
        obj = null;  
    }

}
